Skip to content

calculating number of connections to align with v2 metrics, aligning on db / cluster #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025

Conversation

slorello89
Copy link
Contributor

The endpoint_client_connections metric that was previously being used for calculating the number of connections is, as it turns out, a counter, so it will never reset after clients exit, because of this it was displaying numbers that are misaligned from the reality for the current number of connections to Redis in the Connections widget in New Relic. This should be a calculation (endpoint_client_connections - endpoint_client_disconnections), This PR buckets them and uses the max within the bucket (max makes sense as this is a counter).

I also noticed that the widget was grouping multiple clusters together if they had the same db id (e.g. an A-A database where both clusters had the relevant crdb dbid set to 1 were being combined), hence I added the the cluster facet.

@slorello89 slorello89 requested a review from a team May 6, 2025 12:33
Copy link

@joshrotenberg joshrotenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@slorello89 slorello89 merged commit b26ddd3 into main May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants